<template>
	<view class="">
		<view  class="bar_heng_box">
			<view class="bar_heng_box_item_wai" v-for="(item,index) in list" @click="choose_index = index" :key="index" >
				<view class="title_name" :class="choose_index==index?'title_name_choose':''">
					{{item.name}}
				</view>
				<view class="" :class="choose_index==index?'choose':'bar_heng_box_item'">
					{{item.desc}}
				</view>
			</view>
		</view>
		<shop-list  :style_item="style_item" :list="list[choose_index].goods_data"></shop-list>
	</view>
	
</template>

<script>
	import shopList from '@/componts/index_comp/shopList.vue';
	
	export default {
		components:{
		   shopList,
		},
		props: {
			// 缺省图
			list: {
				type: Array,
				default: []
			},
			style_item: {
				type: Object,
				default: () => ({})
			},
		},
		data() {
			return {
				choose_index:0
			}
		},
		methods: {
			
		}
	}
</script>

<style lang="scss">
	@import url(./bar_heng.scss);
</style>